﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VK.Comm.TransactSql;

namespace VK.Casemeet.Articles
{
    public static class ArticleBLL
    {
        public static int GetArticleCount(IList<Condition> conditionArray)
        {
            return ArticleDAL.GetArticleCount(conditionArray);
        }

        public static List<ArticleEntity> GetArticleList(int startRecordIndex, int endRecordIndex, IList<Condition> conditionArray, string sortField, SortMode sortMode)
        {
            return ArticleDAL.GetArticleList(startRecordIndex, endRecordIndex, conditionArray, sortField, sortMode);
        }

        public static ArticleEntity GetArticle(int articleID)
        {
            return ArticleDAL.GetArticle(articleID);
        }

        public static int InsertArticle(ArticleEntity article)
        {
            return ArticleDAL.InsertArticle(article);
        }

        public static int UpdateArticle(ArticleEntity article)
        {
            return ArticleDAL.UpdateArticle(article);
        }

        public static int DeleteArticle(int articleID)
        {
            return ArticleDAL.DeleteArticle(articleID);
        }

        public static int SetArticleEnable(int articleID)
        {
            return ArticleDAL.SetArticleEnable(articleID);
        }

        public static int HitArticle(int articleID)
        {
            return ArticleDAL.HitArticle(articleID);
        }

        public static int GetSearchCount(SearchUrlEntity searchUrl)
        {
            return ArticleDAL.GetSearchCount(searchUrl);
        }

        public static List<ArticleEntity> GetSearchList(SearchUrlEntity searchUrl)
        {
            return ArticleDAL.GetSearchList(searchUrl);
        }
    }
}
